import { createApp } from 'vue'
import App from './App.vue'
import axios from "axios";
import ECharts from 'vue-echarts'
import { use } from "echarts/core";

// 手动引入 ECharts 各模块来减小打包体积
import {
    CanvasRenderer
} from 'echarts/renderers'
import {
    BarChart,
    PieChart,
} from 'echarts/charts'
import {
    GridComponent,
    TooltipComponent,
    TitleComponent,
    LegendComponent,

} from 'echarts/components'

use([
    CanvasRenderer,
    BarChart,
    GridComponent,
    TooltipComponent,
    TitleComponent,
    PieChart,
    LegendComponent,
]);

axios.defaults.baseURL = '/api'
const app = createApp(App)

// 全局注册组件（也可以使用局部注册）
app.component('v-chart', ECharts)
app.mount('#app')
